/////precompiled////////
#include "precompiled.h"
////////////////////////


#include "prs_FrmButtonStyle.h"
using namespace prs;

// TRuleFrmButtonStyle ////////////////////////////////////////////////////////

//
TRuleFrmButtonStyle::TRuleFrmButtonStyle(
  snt::text::TContext &Context,
  svl::TVariant &VParentNode,
  TRuleFrmStyleState &RStyleState
) 
:vParentNode(VParentNode)
,rStyleState(RStyleState)
{
  snt::TReturn         Return;
  snt::TFVoid          F;
  snt::text::TSequence T(Context);
  snt::text::TKeyword K(Context);
  prs::TFuncNewNodeIntoAttrOldChildren FNewNode;

  this->Name(GetClassName()).Local(vParentNode)
  | K.New("button") & FNewNode.New(VParentNode,TNodeFrmButtonStyle()) & T.New("(") & A.New()
  ;
  
  A.Name(GetClassName() + "[A]")
  | T.New("normal")  & F.New(this,&TRuleFrmButtonStyle::FNormal)  & rStyleState.New() & A.New()
  | T.New("down")    & F.New(this,&TRuleFrmButtonStyle::FDown)    & rStyleState.New() & A.New()
  | T.New("flat")    & F.New(this,&TRuleFrmButtonStyle::FFlat)    & rStyleState.New() & A.New()
  | T.New("disable") & F.New(this,&TRuleFrmButtonStyle::FDisable) & rStyleState.New() & A.New()

  | T.New("EnTimer") & T.New("=") & AB.New()
  
  | T.New(")") & Return.New()
  ;

  AB
  | T.New("true")  & F.New(this,&TRuleFrmButtonStyle::FEnTimer) & A.New()
  | T.New("false")												& A.New()
  ;
  //svl::TMessageModal(GetClassName() << "\r\n" << GetGraphInfo(""));
}
